package org.mm.repository;

import java.util.Date;

import org.springframework.data.jpa.repository.Query;
import org.mm.model.TherapyTaskEvent;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface TherapyTaskEventRepository extends PagingAndSortingRepository<TherapyTaskEvent, Long> {

	@Query("select e from TherapyTaskEvent e where e.therapyTask.therapyTaskId = ?1 and e.therapyTaskEventScheduledDate = ?2")
	public TherapyTaskEvent findByTherapyTask(Long therapyTaskId, Date scheduledDate) throws Exception;

}
